package com.example.makerspace.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.makerspace.mapper.*;
import com.example.makerspace.model.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;


@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "t_application_v2", autoResultMap = true)
@Document(indexName = "t_application_v2")
@ApiModel(value="用户基础信息对象",description="用户基础信息对象")
public class ApplicationV2DO extends BaseDO {

    //用户名
    // 使用ApiModelProperty来标注字段属性。
    @ApiModelProperty(value = "用户名",required = true)
    @Field(name = "username", type = FieldType.Text, analyzer = "ik_max_word")
    private String username;
    //企业名称
    @ApiModelProperty(value = "企业名称")
    @Field(name = "biz_name", type = FieldType.Text, analyzer = "ik_max_word")
    private String bizName;
    //联系人
    @ApiModelProperty(value = "联系人")
    @Field(name = "contact", type = FieldType.Text, analyzer = "ik_max_word")
    private String contact;
    //联系方式
    @ApiModelProperty(value = "联系方式")
    @Field(name = "phone", type = FieldType.Text, analyzer = "ik_max_word")
    private String phone;
    //企业性质
    @ApiModelProperty(value = "企业性质")
    @Field(name = "biz_type", type = FieldType.Text, analyzer = "ik_max_word")
    private String bizType;
    //企业简介
    @ApiModelProperty(value = "企业简介")
    @Field(name = "biz_overview", type = FieldType.Text, analyzer = "ik_max_word")
    private String bizOverview;
    //所属地域
    @ApiModelProperty(value = "所属地域")
    @Field(name = "region", type = FieldType.Text, analyzer = "ik_max_word")
    private String region;
    //相关产品及技术先进性介绍
    @ApiModelProperty(value = "相关产品及技术先进性介绍")
    @Field(name = "adv_intro", type = FieldType.Text, analyzer = "ik_max_word")
    private String advIntro;
    //有无知识产权
    @ApiModelProperty(value = "有无知识产权")
    private Boolean haveIp;
    //知识产权类型
    @ApiModelProperty(value = "知识产权类型")
    @Field(name = "ip_type", type = FieldType.Text, analyzer = "ik_max_word")
    private String ipType;
    //专利类型
    @ApiModelProperty(value = "专利类型")
    @Field(name = "patent_type", type = FieldType.Text, analyzer = "ik_max_word")
    private String patentType;
    //已授权专利
    @ApiModelProperty(value = "已授权专利")
    @TableField(typeHandler = GrantedPatentHandler.class)
    @Field(name = "granted_patents", type = FieldType.Text, analyzer = "ik_max_word")
    private List<GrantedPatent> grantedPatents;
    //已受理专利
    @ApiModelProperty(value = "已受理专利")
    @TableField(typeHandler = PendingPatentHandler.class)
    @Field(name = "pending_patents", type = FieldType.Text, analyzer = "ik_max_word")
    private List<PendingPatent> pendingPatents;
    //获得软件著作权情况
    @ApiModelProperty(value = "获得软件著作权情况")
    @TableField(typeHandler = SoftwareHandler.class)
    @Field(name = "software_status", type = FieldType.Text, analyzer = "ik_max_word")
    private List<Software> softwareStatus;
    //发表论文情况
    @ApiModelProperty(value = "发表论文情况")
    @TableField(typeHandler = MybatisListHandler.class)
    @Field(name = "publications", type = FieldType.Text, analyzer = "ik_max_word")
    private List<String> publications;
    //团队成员
    @ApiModelProperty(value = "团队成员")
    @TableField(typeHandler = TeamMemberHandler.class)
    @Field(name = "team_members", type = FieldType.Text, analyzer = "ik_max_word")
    private List<TeamMember> teamMembers;
    //报名状态
    @ApiModelProperty(value = "报名状态")
    @Field(name = "status", type = FieldType.Text, analyzer = "ik_max_word")
    private String status;
    @ApiModelProperty(value = "父竞赛id")
    @Field(name = "competition_parent_id", type = FieldType.Text, analyzer = "ik_max_word")
    private Integer competitionParentId;
    @ApiModelProperty(value = "附件信息")
    @Field(name="attachments",type = FieldType.Text,analyzer = "ik_max_word")
    private  String attachments;
    //审核反馈
    @ApiModelProperty(value = "审核反馈")
    @Field(name = "review_feedback",type = FieldType.Text,analyzer = "ik_max_word")
    private  String  reviewFeedback;
    @ApiModelProperty(value = "是否实名认证")
    @Field(name = "is_authentication", type = FieldType.Text, analyzer="ik_max_word")
    private Integer isAuthentication;
    @ApiModelProperty(value = "实名认证类型")
    @Field(name = "authentication_type", type = FieldType.Text, analyzer="ik_max_word")
    private String authenticationType;
    @ApiModelProperty(value = "企业名称")
    @Field(name = "ent_name", type = FieldType.Text, analyzer="ik_max_word")
    private  String entName;
    //状态时间线
    @ApiModelProperty(value = "状态时间线")
    @TableField(typeHandler = ApplicationStatusHandler.class)
    private List<ApplicationStatus> statusLine;
    //历史失败原因
    @ApiModelProperty(value = "历史失败原因")
    @TableField(typeHandler = FailReasonHandler.class)
    private List<FailMsg> failHistory;
    //失败原因
    @ApiModelProperty(value = "失败原因")
    private String msg;
    //赛题ID
    @ApiModelProperty(value = "赛题ID")
    private Integer competitionId;
    @ApiModelProperty(value = "赛题名称")
    @Field(name = "competition_name", type = FieldType.Text, analyzer="ik_max_word")
    private  String competitionName;
}
